Repository navigation
Fix PyInstaller version data collision - #2867
Conversation
There was a problem hiding this comment.
Pull request overview
This PR resolves a Windows PyInstaller collect_all("arcade") collision by renaming the packaged version data file from arcade/VERSION to arcade/_VERSION, updating readers and packaging inputs, and adding regression tests to prevent future case-insensitive path conflicts.
Changes:
- Renamed the packaged version data file to
arcade/_VERSIONand updated code paths that read it. - Corrected the PyInstaller hook data destination to target the
arcadedirectory (as required by PyInstaller’s(source, dest_dir)semantics). - Added regression tests covering case-folded collisions and the bundled
_VERSIONdestination path.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| webplayground/server.py | Updates local web playground version-file read path to _VERSION. |
| tests/unit/test_version.py | Adds tests to ensure _VERSION is loaded and data/module names don’t collide when case-folded. |
| tests/unit/test_pyinstaller_hook.py | Adds regression test asserting _VERSION is bundled to arcade/_VERSION. |
| RELEASE_CHECKLIST.md | Updates release instructions to point to arcade/_VERSION. |
| MANIFEST.in | Updates sdist inclusion rule from VERSION to _VERSION. |
| doc/conf.py | Updates commented-out version read path to _VERSION. |
| CHANGELOG.md | Documents the PyInstaller collision fix. |
| arcade/version.py | Switches default version file path and updates docstrings to _VERSION. |
| arcade/_VERSION | Adds the new version data file. |
| arcade/__pyinstaller/hook-arcade.py | Updates hook to collect _VERSION and fixes the destination directory. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8f1404e to
6b1ed00
Compare
|
Rebased onto current development and moved the changelog entry to Unreleased. Verified with PyInstaller builds from a wheel: with the old hook, frozen apps reported arcade.VERSION as 0.0.0 and collect_all builds failed; with this PR both work. Thanks for the fix! |
Summary
arcade/VERSIONdata file toarcade/_VERSIONand update all readers, package metadata, and contributor documentation.arcadedirectory; PyInstaller interprets the second tuple item as a destination directory, not a file path._VERSIONpath.Root cause and impact
The version data file case-folded to the same name as the
arcade.versionmodule. The hook also used./arcade/VERSIONas a filename-shaped destination, although PyInstaller treats that value as a directory. Together withcollect_all("arcade"), this caused a file/directory collision during the WindowsCOLLECTphase.The public
arcade.VERSIONandarcade.__version__APIs are unchanged.Fixes #2837
Validation
pytest tests/unit/test_version.py tests/unit/test_pyinstaller_hook.py -q— 32 passeduv build— wheel and sdist built; both containarcade/_VERSIONand noarcade/VERSION--collect-all arcade— completed; frozen executable printed4.0.0.dev5and contained_internal/arcade/_VERSIONDisclosure: this contribution was prepared with AI assistance. I reviewed the final diff and ran every check listed above.